<html>
<head>
    <meta charset="UTF-8">
    <title>mysetpadding</title>
    <script type="text/javascript" src="../internal.js"></script>
    <script type="text/javascript" src="../../../jquery/jquery-1.7.2.min.js"></script>
    <script type="text/javascript">
    dialog.onok = function testOnok(){
    	var padding = {'top':'','bottom':'','left':'','right':''};
    	if($("#topsize_checkbox").attr("checked")) {
    		padding.top = parseInt($("#topsize_text").val());
    	}
    	if($("#bottomsize_checkbox").attr("checked")) {
    		padding.bottom = parseInt($("#bottomsize_text").val());
    	}
    	if($("#leftsize_checkbox").attr("checked")) {
    		padding.left = parseInt($("#leftsize_text").val());
    	}
    	if($("#rightsize_checkbox").attr("checked")) {
    		padding.right = parseInt($("#rightsize_text").val());
    	}
    	editor.execCommand('mysetpadding',padding);
    	if($("#cellwidth_checkbox").attr("checked")) {
    		var width = parseInt($("#cellwidth_text").val());
    		editor.execCommand('mychangecellwidth',width);
    	}
    	if($("#cellheight_checkbox").attr("checked")) {
    		var height = parseInt($("#cellheight_text").val());
    		editor.execCommand('mychangecellheight',height);
    	}
    };
    </script>
</head>
<body style="padding: 8px">
	<div>
		<p>边距(默认padding为1px)</p>
		<div>
			<input type="checkbox" id="topsize_checkbox"/>
			上边距：
			<input type="text" id="topsize_text" title="复选框打钩有效,整数" value="1"/>
			<br/>
			<input type="checkbox" id="bottomsize_checkbox"/>
			下边距：
			<input type="text" id="bottomsize_text" title="复选框打钩有效,整数" value="1"/>
			<br/>
			<input type="checkbox" id="leftsize_checkbox"/>
			左边距：
			<input type="text" id="leftsize_text" title="复选框打钩有效,整数" value="1"/>
			<br/>
			<input type="checkbox" id="rightsize_checkbox"/>
			右边距：
			<input type="text" id="rightsize_text" title="复选框打钩有效,整数" value="1"/>
		</div>
	</div>
	<hr/>
	<div>
		<p>单元格大小</p>
		<div>
			<input type="checkbox" id="cellwidth_checkbox"/>
			单元格宽：
			<input type="text" id="cellwidth_text" title="复选框打钩有效,整数" value="66"/>
			<br/>
			<input type="checkbox" id="cellheight_checkbox"/>
			单元格高：
			<input type="text" id="cellheight_text" title="复选框打钩有效,整数" value="22"/>
		</div>
	</div>
</body>
</html>